<?php

/**
 * This is the model class for table "{{beceri_tespit}}".
 *
 * The followings are the available columns in table '{{beceri_tespit}}':
 * @property integer $id
 * @property integer $ebeveyn_id
 * @property integer $beceri_id
 * @property integer $tespit_tarihi
 * @property integer $sira
 * @property integer $calisma_baslama_tarihi
 * @property integer $calisma_bitis_tarihi
 * @property string $degerlendirme
 * @property string $calisma_yeri
 * @property string $calisma_araclari
 * @property string $calismanin_amaci
 */
class BeceriTespit extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @param string $className active record class name.
	 * @return BeceriTespit the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return '{{beceri_tespit}}';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('ebeveyn_id, beceri_id, tespit_tarihi, sira, calisma_baslama_tarihi, calisma_bitis_tarihi', 'numerical', 'integerOnly'=>true),
			array('degerlendirme, calisma_yeri, calisma_araclari, calismanin_amaci', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, ebeveyn_id, beceri_id, tespit_tarihi, sira, calisma_baslama_tarihi, calisma_bitis_tarihi, degerlendirme, calisma_yeri, calisma_araclari, calismanin_amaci', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'ebeveyn_id' => 'Ebeveyn',
			'beceri_id' => 'Beceri',
			'tespit_tarihi' => 'Tespit Tarihi',
			'sira' => 'Sira',
			'calisma_baslama_tarihi' => 'Calisma Baslama Tarihi',
			'calisma_bitis_tarihi' => 'Calisma Bitis Tarihi',
			'degerlendirme' => 'Degerlendirme',
			'calisma_yeri' => 'Calisma Yeri',
			'calisma_araclari' => 'Calisma Araclari',
			'calismanin_amaci' => 'Calismanin Amaci',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('id',$this->id);
		$criteria->compare('ebeveyn_id',$this->ebeveyn_id);
		$criteria->compare('beceri_id',$this->beceri_id);
		$criteria->compare('tespit_tarihi',$this->tespit_tarihi);
		$criteria->compare('sira',$this->sira);
		$criteria->compare('calisma_baslama_tarihi',$this->calisma_baslama_tarihi);
		$criteria->compare('calisma_bitis_tarihi',$this->calisma_bitis_tarihi);
		$criteria->compare('degerlendirme',$this->degerlendirme,true);
		$criteria->compare('calisma_yeri',$this->calisma_yeri,true);
		$criteria->compare('calisma_araclari',$this->calisma_araclari,true);
		$criteria->compare('calismanin_amaci',$this->calismanin_amaci,true);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}